<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <canvas id="mycanvas" style="border:1px solid red"></canvas>
  </body>
</html>
<script>
  var can = document.getElementById("mycanvas");
  var ctx = can.getContext("2d");
  var img = new Image();
  img.src = "../images/16.png";
  img.onload = function() {
    ctx.drawImage(img, 0, 0, 100, 100);
    ctx.font = "italic small-caps bold 20px arial";
    ctx.fillText("额", 75, 80);
  };
  console.log("Img:", img);

</script>
